package com.jp.boot.controller;

import com.jp.boot.service.WebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("web")
public class WebController {


    @Autowired
    WebService webService;


    @GetMapping("test")
    public ResponseEntity<String> test() {
        return ResponseEntity.ok(webService.randomString());

    }

    @GetMapping("name")
    public ResponseEntity<String> name() {
        return ResponseEntity.ok(webService.getName());
    }


}
